package com.itlong.cloud.enumerate;

/**
 *<desc>
 *      交易类型的枚举
 *</desc>
 *
 * @createDate 2018/9/20
 */
public enum TradeTypeEnum {

    PROPERTY_FEE("物业抄表费",1),   //物业抄表费
    REPAIR_FEE("维修费",2),   //维修费
    PARKING_FEE("停车费",3),   //停车费
    WECHAT_MCHI_FEE("微信商户",4),   //微信商户
    WECHAT_WITHDRAW_FEE("微信提现",5),   //微信提现
    RECHARGE_FEE("备付金充值",6),   //备付金充值
    CHINA_PAY_FEE("银联转账",7),        //银联转账
    PROPERTY_WITHDRAW_CASH("物业提现",8),        //物业提现
    PROPERTY_ADD_VALUE("物业增值",9),       //物业增值
    TEMPORARY_PASSAGE_VALUE("临时通行",10);        //临时通行



    private String description;
    private Integer type;


    TradeTypeEnum(String value, Integer type) {
        this.type = type;
        this.description = value;
    }

    /**
     * {@link #description}的getter。
     */
    public String getDescription() {
        return description;
    }

    /**
     * {@link #type}的getter。
     */
    public Integer getType() {
        return type;
    }

    /**
     * <desc>
     *      根据设备类型获取设备类型的枚举
     * </desc>
     * @param equipType 枚举类型
     * @return 枚举描述
     * @author Biao.R
     * @createDate 2017/10/13
     */
    public static TradeTypeEnum getByTradeType(Integer equipType){
        if (equipType != null) {
            for (TradeTypeEnum value : values()) {
                if (value.getType() == equipType) {
                    return value;
                }
            }
        }
        return null;
    }


}
